﻿@page
@model ModuleDto
<page-header title="模块"></page-header>
<util-card show-border="false">
    @*查询表单*@
    <partial name="Index.Query" />
    @*工具按钮*@
    <util-button class="mr-sm" color="Primary" icon="Plus" text="创建模块" on-click="openCreateDialog()"></util-button>
    <util-button id="btnDelete" color="Danger" icon="Delete" text="删除" on-click="delete(btnDelete)"></util-button>
    @*提示语*@
    <util-alert class="my-md" type="Info" show-icon="true">
        当前应用程序：<strong class="text-primary mx-md"> {{selectedApplication.name}}</strong>
    </util-alert>
    <util-row gutter="24">
        @*应用程序导航列表*@
        <util-column span="6">
            <application-select (onClick)="selectApplication($event)"></application-select>
        </util-column>
        @*表格*@
        <util-column span="18">
            <util-tree-table id="tableModule" show-checkbox="true" query-param="queryParam" base-url="module"
                             sort="CreationTime desc" auto-load="false" expand-all="true" show-pagination="false">
                <util-tree-table-column for="Name"></util-tree-table-column>
                <util-tree-table-column for="Url"></util-tree-table-column>
                <util-tree-table-column for="Enabled"></util-tree-table-column>
                <util-tree-table-column title="操作">
                    <util-button class="mr-sm" color="Primary" shape="Circle" icon="Plus" tooltip="创建下级模块" on-click="openCreateDialog(row)"></util-button>
                    <util-button class="mr-sm" color="Primary" shape="Circle" icon="Edit" tooltip="编辑" on-click="openEditDialog(row)"></util-button>
                    <util-button class="mr-sm" color="Danger" shape="Circle" icon="Delete" tooltip="删除" on-click="delete(null,row.id)"></util-button>
                    <util-button shape="Circle" icon="Eye" tooltip="详情" on-click="openDetailDialog(row)"></util-button>
                </util-tree-table-column>
            </util-tree-table>
        </util-column>
    </util-row>
</util-card>